//
//  NetworkEngine+imageCloudManager.h
//  MTime
//
//  Created by mtime_lee on 2017/8/15.
//  Copyright © 2017年 imac. All rights reserved.
//

#import "NetworkEngine.h"
#import <COSClient.h>
#define kURLPath_GetImageStorageSign @"/app/user/getSign" //获取腾讯云对象存储签名

/**
 回调参数 

 @param uploadTaskRsp 图片地址
 @param fileName 图片名称
 */
typedef void(^ImageUploadBlock)(COSObjectUploadTaskRsp *uploadTaskRsp,NSString *filePath, NSString *fileName,BOOL isSuccess, NSError *error);

@interface NetworkEngine (imageCloudManager)
@property (assign, nonatomic) UIBackgroundTaskIdentifier backgroundUpdateTask;

/**
 传入图片,返回上传结果 kSTRING_FORMAT(@"%@/%@",filePath,fileName)
 */
- (void)getImageURLWithImage:(UIImage *)image completion:(ImageUploadBlock)completion;

/**
 批量图片上传 传入图片 以及图片下标(用作文件名拼接,防止出现-177错误码),返回上传结果
 */
- (void)getImageURLWithBatchImage:(UIImage *)image batchIndex:(NSUInteger)index completion:(ImageUploadBlock)completion;

/**
 批量图片上传 传入图片 以及图片下标(),返回上传结果
 */
-(void)getImagesUpload:(UIImage *)image batchIndex:(NSUInteger)index completion:(ImageUploadBlock)completion;

- (void)syncConcurrent;


/**
 图片上传  path:上传路径
 */
//- (void)getImageURLWithImage:(UIImage *)image Path:(NSString*)Path batchIndex:(NSUInteger)index completion:(ImageUploadBlock)completion;

- (void)getImageURLWithImage:(UIImage *)image Path:(NSString*)Path fileName:(NSString*)fileName1 batchIndex:(NSUInteger)index Timestamp:(NSString*)Timestamp completion:(ImageUploadBlock)completion;

- (void)getImageURLWithImageOld:(UIImage *)image Path:(NSString*)Path batchIndex:(NSUInteger)index completion:(ImageUploadBlock)completion;

@end
